hip.jni.android.native_window

Undocumented in source.

Members

Enums

ANativeWindowTransform
enum ANativeWindowTransform

Transforms that can be applied to buffers as they are displayed to a window.

ANativeWindow_FrameRateCompatibility
enum ANativeWindow_FrameRateCompatibility

Compatibility value for ANativeWindow_setFrameRate.

ANativeWindow_LegacyFormat
enum ANativeWindow_LegacyFormat

Legacy window pixel format names, kept for backwards compatibility. New code and APIs should use AHARDWAREBUFFER_FORMAT_*.

Functions

ANativeWindow_acquire
void ANativeWindow_acquire(ANativeWindow* window)

Acquire a reference on the given {@link ANativeWindow} object. This prevents the object from being deleted until the reference is removed.

ANativeWindow_getBuffersDataSpace
int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window)

Get the dataspace of the buffers in window.

ANativeWindow_getFormat
int32_t ANativeWindow_getFormat(ANativeWindow* window)

Return the current pixel format (AHARDWAREBUFFER_FORMAT_*) of the window surface.

ANativeWindow_getHeight
int32_t ANativeWindow_getHeight(ANativeWindow* window)

Return the current height in pixels of the window surface.

ANativeWindow_getWidth
int32_t ANativeWindow_getWidth(ANativeWindow* window)

Return the current width in pixels of the window surface.

ANativeWindow_lock
int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds)

Lock the window's next drawing surface for writing. inOutDirtyBounds is used as an in/out parameter, upon entering the function, it contains the dirty region, that is, the region the caller intends to redraw. When the function returns, inOutDirtyBounds is updated with the actual area the caller needs to redraw -- this region is often extended by {@link ANativeWindow_lock}.

ANativeWindow_release
void ANativeWindow_release(ANativeWindow* window)

Remove a reference that was previously acquired with {@link ANativeWindow_acquire()}.

ANativeWindow_setBuffersDataSpace
int32_t ANativeWindow_setBuffersDataSpace(ANativeWindow* window, int32_t dataSpace)

All buffers queued after this call will be associated with the dataSpace parameter specified.

ANativeWindow_setBuffersGeometry
int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format)

Change the format and size of the window buffers.

ANativeWindow_setBuffersTransform
int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transform)

Set a transform that will be applied to future buffers posted to the window.

ANativeWindow_setFrameRate
int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate, int8_t compatibility)

Sets the intended frame rate for this window.

ANativeWindow_tryAllocateBuffers
void ANativeWindow_tryAllocateBuffers(ANativeWindow* window)

Provides a hint to the window that buffers should be preallocated ahead of time. Note that the window implementation is not guaranteed to preallocate any buffers, for instance if an implementation disallows allocation of new buffers, or if there is insufficient memory in the system to preallocate additional buffers

ANativeWindow_unlockAndPost
int32_t ANativeWindow_unlockAndPost(ANativeWindow* window)

Unlock the window's drawing surface after previously locking it, posting the new buffer to the display.

Structs

ANativeWindow
struct ANativeWindow

Opaque type that provides access to a native window.

ANativeWindow_Buffer
struct ANativeWindow_Buffer

Struct that represents a windows buffer.

Meta